#include <iostream>
#include "vectorfunctions.h"

int eliminare(int x[], int l)
{
	int i;
	if(l%2!=0){
		for (i=l/2;i<l-1;i++)
			x[i]=x[i+1];
		return l-1;
	}	
	else {
		for (i=l/2-1;i<l-2;i++)
			x[i]=x[i+2];
		return l-2;
	}
}

int main()
{
	int l;
	int x[100];
	cout<<"Length of array : ";
	cin>>l;
	readVector(x, l);
	l = eliminare(x, l);
	printVector(x, l);
return 0;
}
